package com.center.biz.impl;

import com.center.api.model.SysUser;
import com.center.api.remote.RemoteSysUserService;
import com.center.biz.dao.SysUserMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteSysUserService.class)
public class RemoteSysUserServiceImpl implements RemoteSysUserService{

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public int save(SysUser sysUser) {
        return sysUserMapper.insertSelective(sysUser);
    }

    @Override
    public int update(SysUser sysUser) {
        return sysUserMapper.updateByPrimaryKeySelective(sysUser);
    }

    @Override
    public int delete(int id) {
        return sysUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<SysUser> select(SysUser sysUser) {
        return sysUserMapper.select(sysUser);
    }

    @Override
    public SysUser getById(int id) {
        return null;
    }
}
